home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmCT_106_ModalOneShot < prev    next >
Encoding:
Text File  |  1992-04-08  |  1.5 KB  |  64 lines

  1. /* %filename% -- Modal one-shot dialog */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. /*    This module overrides the AppMaker-generated code in z%dlogname%.%        %*/
  5. /*    It provides a place for you to add your own code and still be able to    */
  6. /*    generate code for new changes to the user interface.  This module will    */
  7. /*    not be regenerated by AppMaker unless you delete it.  Its superclass,    */
  8. /*    z%dlogname%, may be regenerated to handle user interface changes%        %*/
  9. /*    without losing your hand-coded changes to this module.                    */
  10.  
  11. #include <Commands.h>
  12. #include <Global.h>
  13. #include <CDirectorOwner.h>
  14. #include <TBUtilities.h>
  15. #include "ResourceDefs.h"
  16. %for each item gen include%
  17. #include "%dlogname%.h"
  18.  
  19. /*----------*/
  20. void    Do%dlogname%    (CDirectorOwner        *aSupervisor)
  21. {
  22.     C%dlogname%%    %*dialog;
  23.     long            dismisser;
  24.  
  25.     dialog = NULL;
  26.     TRY {
  27.         dialog = new C%dlogname%;
  28.         dialog->I%dlogname% (aSupervisor);
  29.     
  30.         /* initialize dialog panes */
  31.     
  32.         dialog->BeginDialog ();
  33.         dismisser = dialog->DoModalDialog (cmdOK);    
  34.     
  35.         if (dismisser == cmdOK) {
  36.             /* extract values from dialog panes */
  37.         }
  38.     
  39.         dialog->Dispose ();
  40.     } CATCH {
  41.         ForgetObject (dialog);
  42.     } ENDTRY;
  43.  
  44. } /* Do%dlogname% */
  45.  
  46. /*----------*/
  47. void    C%dlogname%::I%dlogname%    (CDirectorOwner        *aSupervisor)
  48. {
  49.     inherited::IZ%dlogname% (aSupervisor);
  50.  
  51.     // any additional initialization for your dialog
  52.  
  53. } /* I%dlogname% */
  54.  
  55. %for each item gen auxiliaryMethod%
  56. /*----------*/
  57. void    C%dlogname%::DoCommand        (long        theCommand)
  58. {
  59.     EndDialog (cmdOK, TRUE);
  60.  
  61. } /* DoCommand */
  62.     
  63. /* %dlogname% */
  64.